/**
 * 
 */
package name.webdizz.gadget.four.envelope.client;

import com.google.gwt.gadgets.client.Gadget;
import com.google.gwt.gadgets.client.NeedsSetPrefs;
import com.google.gwt.gadgets.client.SetPrefsFeature;
import com.google.gwt.gadgets.client.Gadget.ModulePrefs;

/**
 * The 4konverta Google Gadget implementation.
 * 
 * @author Izzet_Mustafayev
 * 
 */
@ModulePrefs(title = "4kGadget", description = "The Google Gadget for http://4konverta.com/", author = "Izzet Mustafayev", author_link = "http://webdizz.name/", author_email = "webdizz@gmail.com", title_url = "http://www.4konverta.com/", screenshot = "http://4kgadget.googlecode.com/svn/trunk/4kgadget.png", thumbnail = "http://4kgadget.googlecode.com/svn/trunk/4kgadget_tmb.png", height = 250, width = 100)
public class Envelope extends Gadget<EnvelopePreferences> implements
		NeedsSetPrefs {

	/**
	 * The reference to {@link SetPrefsFeature}.
	 */
	private SetPrefsFeature preferenceFeature;

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.google.gwt.gadgets.client.Gadget#init(com.google.gwt.gadgets.client
	 * .UserPreferences)
	 */
	protected void init(final EnvelopePreferences preferences) {
		// start MVP
		Mvp mvp = new Mvp(preferences, preferenceFeature);
		mvp.start();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.google.gwt.gadgets.client.NeedsSetPrefs#initializeFeature(com.google
	 * .gwt.gadgets.client.SetPrefsFeature)
	 */
	public void initializeFeature(final SetPrefsFeature feature) {
		this.preferenceFeature = feature;
	}

}
